package com.example.demo.utils;


import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author xieluoyin
 */
public class Constant {
    public interface RequestMethod {
        String ADD="post";
        String DELETE="delete";
        String QUERY="get";
        String UPDATE="put";
        String ALL="post,delete,get,put";

    }
    public interface ResponseCode {
        int SUCCESS = 0;
        int DEFAULT_HINT_CODE = 1;
        /**
         * 参数为null
         */
        int PARAMETER_IS_NULL = 1001;
        int PARAMETER_IS_EMPTY = 1002;
        int PARAMETER_LENGTH_EXCEEDS_THE_UPPER_LIMIT = 1003;
        int PARAMETER_LENGTH_EXCEEDS_THE_LOWER_LIMIT = 1004;
        int PARAMETER_MINIMUM_LENGTH_IS_GREATER_THAN__MAXIMUM_LENGTH = 1005;
        int PARAMETER_MISMATCHING = 1006;
        int DEFAULT_WARNING_CODE = 2;
        int DEFAULT_ERROR_CODE = 3;
        int ERROR_IN_INTERNAL_LOGIC=3001;
        int ERROR_IN_ANNOTATION_CONFIGURATION=3002;
    }


    @AllArgsConstructor
    public enum RegexMatchEnum {
        /**
         *
         */
        R0("",""),
        R1("^[a-zA-Z0-9_\\-\\u4e00-\\u9fa5]+$",
                "需满足中文，英文，数字，中划线，下划线");
        @Getter
        private String reg;
        @Getter
        private String msg;


    }


    public interface DateFormat {
        String SIMPLEDATEFORMAT = "yyyy-MM-dd HH:mm:ss";
    }

}
